//menu

$(function(){
	$.ajax({
	  url: '/education/api/user/detail',
	  method:"POST",  
	  contentType: 'application/json',
      dataType:"json", 
	  success: function(data) {
          if(data.returnCode == 0){
			  $("#loginName").html(data.userName);
          }
      }
	});

    //ios浏览器兼容性处理
    if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
        $('#content-main').css('overflow-y', 'auto');
    }	
})

$("#logoutBtn").click(function () {
    $.ajax({
        method:"POST",
        url:"/education/api/login/authLogout",
        contentType: 'application/json',
        dataType:'json',
        success:function(rsp){
            if(rsp.returnCode=="0000"){
                //登录成功 跳转主页面
                window.location.href="/education/html/login.html"
            }else{
                alert("登录失败！");
            }
        },
        error:function(returnMsg){
            console.log(returnMsg);
        }
    })
})